package ui.common
{
	import adapter.common.AdapterBase;
	import flash.display.MovieClip;

	/**
	 * @author Administrator
	 */
	public class MovieClipObject extends MovieClip implements IUIBase
	{
		private var _adpter:AdapterBase;
		
		public function MovieClipObject()
		{
			super();
			stop();
		}
		
		public function attachAdapter(dapter : AdapterBase) : void
		{
			if(_adpter)
			{
				deattachAdapter();
			}
			_adpter = dapter;
			create();
		}

		public function deattachAdapter() : void
		{
			destory();
			_adpter = null;
		}

		public function update() : void
		{
		}

		public function create() : void
		{
		}

		public function destory() : void
		{
		}

		public function get adapter() : AdapterBase
		{
			return _adpter;
		}
	}
}
